VERSION 5.00
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmBasicAPSetupNew 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Payables Setup"
   ClientHeight    =   2505
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6945
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2505
   ScaleWidth      =   6945
   StartUpPosition =   2  'CenterScreen
   Begin ITGControls.ComunionFrames ComunionFrames1 
      Height          =   3105
      Left            =   0
      Top             =   0
      Width           =   6945
      _ExtentX        =   12250
      _ExtentY        =   5477
      FrameColor      =   12829635
      BackColor       =   16243138
      FillColor       =   16243138
      Style           =   0
      RoundedCorner   =   0   'False
      Caption         =   ""
      TextColor       =   13579779
      Alignment       =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Begin VB.CommandButton cmdPickAccount 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   2595
         Picture         =   "frmBasicAPSetupNew.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   315
         Width           =   315
      End
      Begin VB.ComboBox cboTaxType 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Height          =   315
         Left            =   1410
         TabIndex        =   6
         Top             =   1425
         Width           =   1515
      End
      Begin VB.CheckBox chkTaxable 
         BackColor       =   &H00F7D9C2&
         Caption         =   "Vatable ?"
         Height          =   270
         Left            =   1425
         TabIndex        =   5
         Top             =   915
         Width           =   1080
      End
      Begin ITGControls.ITGCommandButton cmdSkip 
         Height          =   345
         Left            =   5400
         TabIndex        =   3
         Top             =   1815
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   609
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "&Skip"
      End
      Begin ITGControls.ITGCommandButton cmdOK 
         Height          =   345
         Left            =   4125
         TabIndex        =   2
         Top             =   1815
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   609
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "&OK"
      End
      Begin ITGControls.ITGTextBox txtTitle 
         Height          =   285
         Left            =   2955
         TabIndex        =   4
         TabStop         =   0   'False
         Top             =   330
         Width           =   3735
         _ExtentX        =   6482
         _ExtentY        =   503
         BackColor       =   14737632
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "ITGtext"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3675
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtAcctNo 
         Height          =   285
         Left            =   180
         TabIndex        =   0
         Top             =   330
         Width           =   2370
         _ExtentX        =   3969
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Mandatory       =   -1  'True
         Label           =   "Account No"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1110
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtAmount 
         Height          =   285
         Left            =   180
         TabIndex        =   1
         Top             =   630
         Width           =   2745
         _ExtentX        =   4630
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0.00"
         DataType        =   1
         Mandatory       =   -1  'True
         DecimalPlace    =   2
         Label           =   "Amount"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1485
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtTaxRate 
         Height          =   285
         Left            =   180
         TabIndex        =   7
         Top             =   1815
         Width           =   2715
         _ExtentX        =   4577
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "EWT Rate"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1455
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtTaxType 
         Height          =   285
         Left            =   180
         TabIndex        =   8
         Top             =   1425
         Width           =   2160
         _ExtentX        =   3598
         _ExtentY        =   503
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Tax Type"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1250
         TextBoxWidth    =   850
      End
   End
End
Attribute VB_Name = "frmBasicAPSetupNew"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2010.07.22

Option Explicit
Dim chkvalue As Boolean
Dim ewt As String

Private Sub cboTaxType_DropDown()
 Call LoadComboValues(cboTaxType, "cParamname", "PARAMETER_USER", "WHERE cType = 'ATCCode'")
End Sub

Private Sub txtTaxType_Change()
    If Trim(txtTaxType) <> "" Or txtTaxType <> vbNullString Then
        cboTaxType = Trim(txtTaxType)
    Else
        cboTaxType.ListIndex = -1
    End If
End Sub

Private Sub cboTaxType_Click()
    txtTaxType = Trim(cboTaxType)
    txtTaxRate = CDbl(GetValueFrTable("cValue", "PARAMETER_USER", "cParamName = '" & cboTaxType & "' and cType='ATCCode'"))
End Sub

Private Sub cboTaxType_KeyPress(KeyAscii As Integer)
KeyAscii = 0
SendKeysTab KeyAscii
End Sub


Private Sub cmdOK_Click()
Dim val As Boolean
If cTax = "VAT" Then chkvalue = True
If chkTaxable.Value = Checked Then val = True
ewt = cEwtCode
If cTax <> "" Then
    If chkvalue <> val Or ewt <> txtTaxType Then
        MsgBox "You cannot change the EWT rate and Taxable", vbInformation, "Comunion"
        Exit Sub
    End If
End If
If ewt <> "" Then
    If ewt <> txtTaxType Then
        MsgBox "You cannot change the EWT rate and Taxable", vbInformation, "Comunion"
        Exit Sub
    End If
End If
If Trim(txtAmount) = "" Or Trim(txtAmount) = "0.00" Then
    MsgBox "Field 'Amount' is mandatory. Zero/Null value is not allowed.", vbInformation, msgTtl
    Exit Sub
End If
    vStrContainer1 = txtAcctNo
    vStrContainer2 = GetValueFrTable("cTitle", "ACCOUNT", "cAcctNo = '" & Trim(txtAcctNo) & "'")
    vStrContainer3 = IIf(chkTaxable.Value, "Yes", "No")
    vStrContainer4 = cboTaxType
    vNumContainer1 = txtAmount
    vNumContainer2 = txtTaxRate
    vNumContainer3 = txtTaxType
    Unload Me
End Sub

Private Sub cmdSkip_Click()
    cString = "Skip"
    Unload Me
End Sub

Private Sub Form_Load()
    If Trim(cTax) = "" Then
        chkTaxable.Value = Unchecked
        chkTaxable.Enabled = True
    Else
        If cTax = "VAT" Then
            chkTaxable.Value = Checked
        Else
            chkTaxable.Value = Unchecked
        End If
        chkTaxable.Enabled = True
    End If

    If cEwtCode = "" And cEwtrate = "0.00" And Trim(cTax) = "" Then
        Call LoadComboValues(cboTaxType, "cParamname", "PARAMETER_USER", "WHERE cType = 'ATCCode'")
        cboTaxType.Enabled = True
    Else
        txtTaxType.Text = cEwtCode
        txtTaxRate = CDbl(GetValueFrTable("cValue", "PARAMETER_USER", "cParamName = '" & cboTaxType & "' and cType='ATCCode'"))
        cboTaxType.Enabled = True
    End If

'    Call LoadComboValues(cboTaxType, "cParamname", "PARAMETER_USER", "WHERE cType = 'ATCCode'")
    cString = ""

End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmBasicAPSetupNew = Nothing
End Sub

Private Sub cmdPickAccount_Click()
    If lPickListActive Then Exit Sub
    PassFilterStringValue Trim(txtAcctNo)
    frmITGPicker.zType = QAccounts
    frmITGPicker.Show vbModal
    txtAcctNo = frmITGPicker.zCode
    txtTitle = frmITGPicker.zName
    If Trim(txtTitle) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub txtAcctNo_Change()
    txtTitle = ""
    txtTitle = GetValueFrTable("cTitle", "ACCOUNT", "cAcctNo = '" & Trim(txtAcctNo) & "'")
End Sub

Private Sub txtAcctNo_LostFocus()
    If Trim(txtTitle) = "" And Trim(txtAcctNo) <> "" Then cmdPickAccount_Click
End Sub

'Passing string value to variable 'sFilterString'
Public Sub PassFilterStringValue(str As String)
    If Trim(str) <> "" Then
        sFilterString = Trim(str)
    Else
        sFilterString = ""
    End If
End Sub


'Private Sub UpdateProjectLabel()
'    lblProject.Caption = Trim(vProjNo) & "-" & Trim(GetValueFrTable("cDiv", "PMS_DIVISION", "cDivisionID = '" & _
'        Trim(txtDivision) & "'") & "") & Trim(txtSBU & "") & Right(Trim(txtService & ""), 1)
'End Sub


